USE [KXCXWDB]
GO

/****** Object:  Table [dbo].[DictInfo]    Script Date: 12/22/2011 22:24:21 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[DictInfo](
	[DictType] [nvarchar](50) NOT NULL,
	[DictTypeDesc] [nvarchar](50) NOT NULL,
	[Code] [nvarchar](50) NOT NULL,
	[CodeDesc] [nvarchar](50) NOT NULL,
	[Memo] [nvarchar](100) NULL,
	[CreateBy] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
 CONSTRAINT [PK_DictInfo] PRIMARY KEY CLUSTERED 
(
	[DictType] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'字典类型，比如PromoteType 促销类型' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DictInfo', @level2type=N'COLUMN',@level2name=N'DictType'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'字典类型描述' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DictInfo', @level2type=N'COLUMN',@level2name=N'DictTypeDesc'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'字典值' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DictInfo', @level2type=N'COLUMN',@level2name=N'Code'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'字典值描述' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DictInfo', @level2type=N'COLUMN',@level2name=N'CodeDesc'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DictInfo', @level2type=N'COLUMN',@level2name=N'Memo'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DictInfo', @level2type=N'COLUMN',@level2name=N'CreateBy'
GO

ALTER TABLE [dbo].[DictInfo] ADD  CONSTRAINT [DF_DictInfo_CreateBy]  DEFAULT (N'system') FOR [CreateBy]
GO

ALTER TABLE [dbo].[DictInfo] ADD  CONSTRAINT [DF_DictInfo_CreateTime]  DEFAULT (getdate()) FOR [CreateTime]
GO

